1. Field of the Invention
The present invention relates to video coding and decoding and more particularly to a shape information coding and decoding apparatus for adaptively bordering and method therefor, wherein bordering is performed with respect to blocks of shape information when forming contexts in order to context-based arithmetic encode a shape in a picture.
2. Description of Related Art
There is a case that only a certain particular object in a frame is intended to be processed to increase coding efficiency or improve picture quality in processing video information. In this case, shape information of the particular object is required to separate the particular object from a background.
A block of a particular object""s shape information includes pixels for the particular object, the pixels having a specified value (for example, xe2x80x9c1xe2x80x9d), and pixels for others except the object, the pixels having a specified value xe2x80x9c0xe2x80x9d. The shape information of the particular object is divided into blocks of a predetermined size (for example, 16xc3x9716 and 8xc3x978) and a specified operation is performed with respect to ambient pixels of the pixels to be coded in order to code the shape information within a block.
FIG. 1 is a block diagram of a conventional object-based video coder.
Concepts of a shape coder and a video object planes (VOP) are introduced here. The VOP indicates an object at a certain point in a time domain of a content having a predetermined shape which can be accessed and edited by a user. The information should be coded by each VOP for support of a content-based functionality.
Primarily, signals of a picture are classified into shape information and texture information and two types of information are respectively inputted to a shape coding unit 11 and motion estimation unit 12.
The shape coding unit 11 performs lossy coding or lossless coding with respect to the shape information of a relevant frame. Reconstructed shape information is inputted to both motion compensation unit 13 and texture coding unit 17. Both the motion compensation unit 13 and texture coding unit 17 operate based upon an object. A shape information bit stream, which is another output of the shape coding unit 11, is inputted to a multiplexer 18.
The motion estimation unit 12 estimates motion information of a current frame""s texture information using input texture information of the current frame and texture information of a previous frame which is stored in a previous reconstructed frame memory 14. The estimated motion information is inputted to the motion compensation unit 13 while a motion information bit stream is encoded and inputted to the multiplexer 18. The motion compensation unit 13 performs motion compensation using the motion information obtained through the motion estimation unit 12 and the previous reconstructed frame received from the previous reconstructed frame memory 14.
The texture coding unit 17 codes a prediction error. The prediction error is a difference between input texture information obtained through a subtracter 15 and motion compensated texture information obtained through the motion compensation unit 13. A texture bit stream which is generated through the coding at the texture coding unit 17 is inputted to the multiplexer 18 and an error signal of reconstructed texture information is inputted to an adder 16. The previous reconstructed frame memory 14 stores a previous reconstructed frame signal received from the adder 16. The previous reconstructed frame signal is obtained by adding the error signal of the reconstructed texture information to the motion compensated signal.
Digital video may be classified into progressive video and interlaced video according to frame constructing methods. For the progressive video, a frame is constructed in such a manner that lines consecutively progresses from the top to the bottom. For the interlaced video, a frame is constructed in such a manner that a field of odd lines is primarily constructed and then even lines in the other field are interlaced with the odd lines of the first field. A height (the number of lines) of the field is a half of the height of the frame. This is illustrated in FIGS. 2a and 2b. FIG. 2a shows a frame of the progressive video and FIG. 2b shows two fields -a top field and a bottom field- and a frame of the interlaced video. In FIGS. 2a and 2b, the top and bottom fields consist of lines (solid arrows in the top field and dotted arrows in the bottom field) and the lines of each field interlace (the solid arrows are interlaced with the dotted arrows) to construct an interlaced frame.
When the top and bottom fields are constructed, as shown in FIG. 2b, there is a time gap between the two fields and the top field precedes the bottom field. In other cases, the bottom field may precede the top field. For the lines forming a frame in an interlaced video, the lines constructing the top field and the lines constructing the bottom field are separately scanned by each field. Because of the time gap between the top field and the bottom field, signal characteristics of neighboring lines in the interlaced frame can be different.
Particularly, in case of a picture having a lot of motion, this feature described above is prominent. When applying video coding functions developed in accordance with properties of the progressive video, such as motion estimation, motion compensation, and discrete cosine transform (DCT), to the coding of the interlaced video, reduction of coding efficiency is caused. Technology, such as field-based motion estimation and compensation and adaptive frame/field DCT, has been developed to overcome this problem. Such technology is disclosed in the standard MPEG-2 established by the ISO/IEC JTC1/SC29/WG11 for applications of digital TV and the like. The technology has been frequently applied to actual application products.
FIGS. 3a and 3b show interlaced shape information where an object has no motion or a little motion between two fields. As shown in FIG. 3a, correlation between lines in a frame is higher compared with that in each field, so it is better to code the shape information from a frame than from each field in this case.
FIGS. 4a and 4b show shape information where an object has much motion between two fields. As shown in FIG. 4a where the lines are grouped into each field, variation between shape information of each line is little and correlation between lines is high in the same field. However, as shown in FIG. 4a, when considering a whole frame, the variation between shape information of each line is larger, so the correlation between lines is lower. Therefore, coding efficiency is reduced when coding the shape information from the frame.
It is best to adaptively select one between a field coding mode and a frame coding mode rather than to use only one mode when coding the interlace shape information.
FIG. 5a shows a context for performing context-based arithmetic encoding (CAE) in an INTRA mode. A value of a pixel 51 is encoded through a specified operation using pixels C0 to C9 neighboring with the pixel 51 to be encoded. FIG. 5b shows a context for performing the CAE in an INTER mode. A value of a pixel 52 is encoded through a specified operation using pixels C0 to C3 neighboring with the pixel 52 to be encoded in a current block and a pixel C6 corresponding to the pixel 52 and its neighboring pixels C4, C5, C7, and C8 in a previous frame.
When coding shape information of a particular object, the information is divided into binary alpha blocks (BABs) of a predetermined size, for example, 16xc3x9716. In this case, bordering is performed to construct contexts of outer pixels of a BAB. As shown in FIGS. 5a and 6, if the pixel 51 to be encoded is located in the left border of a BAB 61, values of the pixels C0, C1, C5, C6, and C9 in FIG. 5a cannot be acknowledged, so the BAB 61 is bordered by a left border 63 and a left top border 64 respectively at its left and left top sides. Similarly, if the pixel 51 to be encoded is located in the top border of the BAB 61, values of the pixels C2 to C9 in FIG. 5a cannot be acknowledged, so the BAB 61 is bordered by a top border 62 and a right top border 65 respectively at its top and right top side. The bordering is a process of taking border values from neighborhood BABs.
As shown in FIG. 6, the current BAB is bordered by a top border, a left border, a left top border, and a right top border but a bottom and a right borders are omitted. As shown in FIG. 7, for a motion compensated (MC) BAB 71, the bordering is performed with respect to each single pixel at the left, right, top, and bottom borders. When the pixel 51 in FIG. 5a is at the border of the BAB and the values of the pixels C7, C3, and C2 cannot be acknowledged in the INTRA mode, an operation is performed under the definition of C7=C8, C3=C4, and C2=C3. When the pixel 51 in FIG. 5a is at the border of the BAB and the value of the pixel C1 cannot be acknowledged in the INTER mode, an operation is performed under the definition of C1=C2. In the INTER mode, values of the pixels C4 to C8 in FIG. 5b have already been known because they are the pixels of the previous frame.
FIGS. 8a and 8b respectively show a bordered frame BAB and its fields. A bordered current frame BAB is divided into two fields as shown in FIG. 8b. In FIG. 8b, a result of the bordering performed with respect to the frame BAB is left just as it is and pixels in the frame BAB are grouped into separate fields and then the CAE is performed. As shown in FIG. 8b, there are cases that a pixel of a top field in the BAB 81 is bordered by a frame bordering pixel 83 of a bottom field. In this regard, a value of the pixel of the field BAB 81 does not coincide with that of the bordering pixel 83. Such bordering causes decrease of correlation in constructing the context, so a lot of coded bits are generated. When individually performing the CAE with respect to each field with the bordering pixels of the frame BAB maintained, as shown in FIGS. 8a and 8b, some outer pixel values do not coincide with their bordering pixel values. This causes generation of many coded bits, thereby deteriorating coding efficiency.
Accordingly, the present invention is directed to a shape information coding and decoding apparatus for adaptively bordering and method therefor that substantially obviates one or more of the limitations and disadvantages of the related art.
An objective of the present invention is to provide a shape information coding and decoding apparatus for adaptively bordering and method therefor, wherein BABs are adaptively bordered according to a frame/field mode.
Another objective of the present invention is to provide a shape information coding and decoding apparatus for adaptively bordering and method therefor, wherein pixels in a top field are bordered by pixels in a top field and pixels in a bottom field are bordered by pixels in a bottom field when coding a block of shape information in an interlaced picture.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure as illustrated in the written description and claims hereof, as well as the appended drawings.
To achieve these and other advantages, and in accordance with the purpose of the present invention as embodied and broadly described, adaptive bordering and coding of the shape information is performed in such a manner of receiving the shape information and storing a BAB; determining whether to perform frame mode coding or field mode coding based upon characteristics of the BAB; and when the frame mode coding is selected, performing frame mode bordering before performing frame BAB coding, and when the field mode coding is selected, performing field mode bordering before performing field BAB coding. In the field mode bordering, a top field in said BAB is bordered by pixels of top fields and a bottom field in said BAB is bordered by pixels of bottom fields.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are intended to provide further explanation of the invention as claimed.